<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
 </head>
 <body>
  
 </body>
</html>
<script>
	//闭包
	function outer(){
		var b = 0;
		function inner(){
			b++;
			console.log(b);
		};
		//把inner函数体返回出去
		return inner;
	};
	//引用这个函数
	var inn1 = outer();
	inn1();
	inn1();
	inn1();
	//重新引用
	var inn2 = outer();
	inn2();
</script>
